package net.steam.easyjoboa.biz;

import java.util.List;
import net.steam.easyjoboa.entity.Leave;
import net.steam.easyjoboa.entity.PageBean;

public interface LeaveBiz {

	/**
	 * 添加请假信息
	 * @param leave
	 * @throws Exception 
	 */
	public void addLeave(Leave leave) throws Exception;
	
	/**
	 * 获取请假信息
	 * @param id
	 * @return
	 */
	public Leave getLeaveById(Integer id);
	
	/**
	 * 获取自己所有的请假信息
	 * @param id
	 * @return
	 */
	public List<Leave> findMyLeaves(PageBean pb,Integer userId,String startDate,String endDate);
	
	/**
	 * 获取所有请假信息
	 * @param pb 分页
	 * @param propertyName 列名
	 * @param value 列值
	 * @return
	 */
	public List<Leave> findAllLeaves(PageBean pb,Integer userId,String startDate,String endDate,String userName,String departmentName,String type);
	
	/**
	 * 删除请假信息
	 * @param id
	 * @throws Exception
	 */
	public void delLeave(Integer id) throws Exception;
	
	/**
	 * 更新请假信息
	 * @param leave
	 */
	public void updateLeave(Leave leave);
}
